package com.lu.reggie.config;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MybatisPlusConfig {

    @Bean//因特赛布特儿
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        //配置插件类
        MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
        //可以指定数据类型DbType.MYSQL
        mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());
        return mybatisPlusInterceptor;
    }
}
